package com.xd.cloud.entity.core;

import com.xd.cloud.entity.BaseEntity;
import javax.persistence.*;

/**
 * @author wangtao
 * @class_name Menu
 * @description 系统菜单
 * @create 2017/12/19
 */
@Entity
@Table(name = "sys_menu")
public class Menu extends BaseEntity {

    /**
     * 菜单名称
     */
    private String name;
    /**
     * 菜单module
     */
    private String module;

    /**
     * 菜单subModule
     */
    private String subModule;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     */
    private String type;


    private Integer porder;

    public Integer getPorder() {
        return porder;
    }

    public void setPorder(Integer porder) {
        this.porder = porder;
    }

    public Integer getCorder() {
        return corder;
    }

    public void setCorder(Integer corder) {
        this.corder = corder;
    }

    private Integer corder;

    /**
     * 父亲id值
     */
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "parentid")
    private Menu parentMenu;

    public Menu getParentMenu() {
        return parentMenu;
    }

    public void setParentMenu(Menu parentMenu) {
        this.parentMenu = parentMenu;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getSubModule() {
        return subModule;
    }

    public void setSubModule(String subModule) {
        this.subModule = subModule;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
